
import axios from '@/utils/request.js'
import qs from 'qs'; 

// 页面登录
// export const loginApi = data => post('/oauth/token', data);

const ordersApi = {    
  // 地图信息  
  areaInfo (data) {        
      return axios.get(`/aMap/KeywordsAddByLbs/${data}`);
  },

  //获取运单列表
  ordersList (data) {
    return axios.get('/orders?field=lastModifiedTime&order=DESC',{params:data})
  },
  //获取运单异常列表
  ordersErrList (data) {
    return axios.get('/orders?field=lastModifiedTime&order=DESC&status=PLATFORM_REJECT',{params:data})
  },
  //新增运单
  addOrder(data){
    return axios.post('/orders',data)
  },
  //获取运单信息
  editOrder(data){
    return axios.get(`/orders/${data}`)
  },
  //获取运单信息
  saveOrderInfo(id,data){
    return axios.put(`/orders/${id}`,data)
  },
  //提交订单信息
  submitForm(id){
    return axios.post(`/orders/${id}`)
  },

  
}
export default ordersApi;
